package hospital.user.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import hospital.model.user.UserInfo;
import hospital.vo.user.LoginVo;
import hospital.vo.user.UserAuthVo;
import hospital.vo.user.UserInfoQueryVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @description:
 * @create 2023/4/3-15:24
 */

public interface UserInfoService extends IService<UserInfo> {
//    用户的登录验证
    Map<String, Object> login(LoginVo user);

    //判断数据库是否存在微信的扫描人信息
    //根据openid判断 ,如果存在用户的信息，则会重复添加
    UserInfo getUesrInfoByOpenid(String openid);
    @Transactional
    //用户认证接口
    void userAuth(Long userId, UserAuthVo authVo);

    //后台分页查询用户列表
    Page<UserInfo> findALl(Integer page, Integer limit, UserInfoQueryVo queryVo);

    //用户的锁定
    void lock(Long id, Integer status);

    //查询用户详情
    Map<String, Object> show(Long id);

    //认证审批
    void approval(Long id, Integer authStatus);
}
